import request2 from '@/sheep/request2';


/**
	 * 获取有效券面分页
  GET /admin-api/biz/coupon-surface/pageValidCouponSurfaces
  接口ID：142966648
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-142966648
	 */
export const pageValidCouponSurfaces = (params) =>{
	return request2({
		url: '/admin-api/biz/coupon-surface/pageValidCouponSurfaces',
		method: 'GET',
		params,
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}

/**
 * 获得券面
  GET /admin-api/biz/coupon-surface/get
  接口ID：140150340
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-140150340
 */
export const getCouponDetails = (id) =>{
	return request2({
		url: `/admin-api/biz/coupon-surface/get?id=${id}`,
		method: 'GET',
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}

/**
 * 获取启用的券包
  GET /admin-api/biz/coupon-surface-package/pageEnabledPackage
  接口ID：143017966
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-143017966
 */
export const pageEnabledPackage = (params) =>{
	return request2({
		url: '/admin-api/biz/coupon-surface-package/pageEnabledPackage',
		method: 'GET',
		params,
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}

/**
 * 领取券
  POST /admin-api/biz/coupon/receiveCoupon
  接口ID：143134246
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-143134246
 */
export const receiveCoupon = (data) =>{
	return request2({
		url: '/admin-api/biz/coupon/receiveCoupon',
		method: 'post',
		data,
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}

/**
 * 获得券包详情
  GET /admin-api/biz/coupon-surface-package/get
  接口ID：140833004
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-140833004
 */
export const getPacketCouponDetails = (id) =>{
	return request2({
		url: `/admin-api/biz/coupon-surface-package/get?id=${id}`,
		method: 'GET',
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}

/**
 * 获取券包关联有效券面列表
  GET /admin-api/biz/coupon-surface-package/listPackageCouponSurfaces
  接口ID：143024334
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-143024334
 */
export const listPackageCouponSurfaces = (id) =>{
	return request2({
		url: `/admin-api/biz/coupon-surface-package/listPackageCouponSurfaces?couponSurfacePackageId=${id}`,
		method: 'get',
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}

/**
 * 领取券包
  POST /admin-api/biz/coupon-surface-package/receiveCouponPackage
  接口ID：143134247
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-143134247
 */
export const receiveCouponPackage = (data) =>{
	return request2({
		url: '/admin-api/biz/coupon-surface-package/receiveCouponPackage',
		method: 'post',
		data,
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}

/**
 * 获取居民的券分页
  GET /admin-api/biz/coupon/pageResidentCoupon
  接口ID：143002720
  接口地址：https://app.apifox.com/link/project/3882114/apis/api-143002720
 */
export const pageResidentCoupon = (params) =>{
	return request2({
		url: '/admin-api/biz/coupon/pageResidentCoupon',
		method: 'GET',
		params,
		header: {
			'tenant-id': '1',
			'Authorization': ''
		}
	})
}